<!-- 
the following variables can be used for category statistics:

$total_count = total number of threads (including stickys)
$comment_count = total number of posts (including stickys and each threas as 1 post)
count($notice_list) = number of stickys
 -->
<form action="./" method="get" class="forumListForm">
	<div id="topic">
		<!--@if($total_count || Context::get('category'))-->
			<div id="buttonsLeft" class="forumButton">
				<!--@if(Context::get('is_logged')) -->
				<a href="{getUrl('act','dispForumWrite','document_srl','','search_target','','search_keyword','')}">{$lang->new_thread}</a>
				<!--@else-->
				<a href="{getUrl('act','dispMemberLoginForm','document_srl','','search_target','','search_keyword','')}">{$lang->new_thread}</a>
				<!--@end-->
				<!--@if($grant->manager || $grant->moderator)-->
					<a href="{getUrl('','module','document','act','dispDocumentManageDocument','module_srl',$module_info->module_srl)}" onclick="popopen(this.href,'manageDocument'); return false;">{$lang->cmd_manage_document}</a>
				<!--@end-->
			</div>
		<!--@end-->
	</div>
	<!--@if(!$oDocument->isExists() && !Context::get('search_keyword'))-->
	<include target="category_table_children.html" />
	<!--@end-->
	<!--@if($category_list[$category]->depth >=0 || Context::get('search_keyword') || !$category_list[$category]->child_count)-->
<div id="forum_mod" class="thread_lists">
	<table cellpadding="0" cellspacing="0" border="0" class="forumCategoryList">
	<thead>
			<tr>
				{@ $columnCount=count($list_config)+1}
                <th style="width:45%">
					<div class="th1"><!--@if($grant->manager || $grant->moderator)--><input type="checkbox" onclick="XE.checkboxToggleAll({ doClick:true }); return false;" /><!--@end-->{$lang->document_count}</div>
                </th>		
				
                <!--@foreach($list_config as $key => $val)-->
                    <!--@if($val->idx == -1)-->
                        <!--@if($val->type == 'regdate')-->
                            <th>
									<a href="{getUrl('sort_index','regdate','order_type',$order_type)}">{$lang->regdate}<!--@if($sort_index=='regdate')--><img src="./images/common/{$order_icon}" alt="sort" width="5" height="3" class="sort" /><!--@end--></a>>
							</th>
                        <!--@elseif($val->type == 'last_update')-->
                            <th style="width:20%">
									<div class="th4"><a href="{getUrl('sort_index','last_update','order_type',$order_type)}">{$lang->last_update}<!--@if($sort_index=='last_update')--><img src="./images/common/{$order_icon}" alt="sort" width="5" height="3" class="sort" /><!--@end--></a></div>
							</th>
                         <!--@elseif($val->type == 'comment_count')-->
                            <th style="width:15%">
									<div class="th3"><a href="{getUrl('sort_index','comment_count','order_type',$order_type)}">{$lang->comments}<!--@if($sort_index=='comment_count')--><img src="./images/common/{$order_icon}" alt="sort" width="5" height="3" class="sort" /><!--@end--></a></div>
							</th>
						<!--@elseif($val->type == 'Replies')-->
                            <th>
									<a href="{getUrl('sort_index','comment_count','order_type',$order_type)}">{$lang->replies}<!--@if($sort_index=='comment_count')--><img src="./images/common/{$order_icon}" alt="sort" width="5" height="3" class="sort" /><!--@end--></a>
							</th>
                        <!--@elseif($val->type == 'readed_count')-->
                            <th style="width:15%">
									<div class="th2"><a href="{getUrl('sort_index','readed_count','order_type',$order_type)}">{$lang->readed_count}<!--@if($sort_index=='readed_count')--><img src="./images/common/{$order_icon}" alt="sort" width="5" height="3" class="sort" /><!--@end--></a></div>
							</th>
                        <!--@end-->
                    <!--@else-->
                            <th>
									{$val->name}
							</th>
                    <!--@end-->
                <!--@end-->
			</tr>
			</thead>
	</table>
	
	<table cellpadding="0" cellspacing="0" border="0" class="forumCategoryList">
	<tbody>
	<!--@if(count($notice_list) && !Context::get('search_keyword') && Context::get('page')==1) -->
	<!--@if(!$total_count || !count($document_list))-->
		<tr>
			<td colspan="<!--@if($grant->manager || $grant->moderator)-->{count($list_config)+1}<!--@else-->{count($list_config)}<!--@end-->">
				{$lang->no_articles}
			</td>
		</tr>
	<!--@else-->

		{@ $i=0}
		<!--@foreach($notice_list as $no => $document)-->
			{@ $i++}
			<tr class="bg{($i+1)%2+1} separator notice">
				<!--@if($grant->manager || $grant->moderator) -->
					<td>
						<input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)"  <!--@if($document->isCarted())-->checked="checked"<!--@end--> />
					</td>
				<!--@end-->
				<td>
					<h3>
						<a href="{getUrl('document_srl',$document->document_srl, 'listStyle', $listStyle, 'cpage',1)}">
							{$document->getTitle($module_info->subject_cut_size)}
						</a>
					</h3>
					<p>
						<span>{$lang->started_by}:</span>
						<a href="#popup_menu_area" class="member_{$document->get('member_srl')}" onclick="return false">
							{$document->getNickName()}
							</a>
					</p>
				</td>
				<!--@foreach($list_config as $key => $val)-->

					<!--@if($val->idx == -1)-->
										
						<!--@if($val->type == 'regdate')-->
							<td>
								{$document->getRegdate('Y-m-d')}
							</td>
						<!--@elseif($val->type == 'last_update')-->
							<td>
								{zdate($document->get('last_update'),'Y-m-d')} 
							</td>
						<!--@elseif($val->type == 'comment_count')-->
							<td>
									<span class="replyNum" title="Posts">{$document->getCommentCount()+1}</span>
							</td>
						<!--@elseif($val->type == 'Replies')-->
							<td>
									<span class="replyNum" title="Posts">{$document->getCommentCount()}</span>
							</td>
						<!--@elseif($val->type == 'readed_count')-->
							<td>
								{$document->get('readed_count')}
							</td>
						<!--@end-->

					<!--@else-->
							<td>{$document->getExtraValueHTML($val->idx)}&nbsp;</td>
					<!--@end-->
				<!--@end-->
				<td></td>
			</tr>
		<!--@end-->
	<!--@end-->
	<!--@end-->
	
	<!--@if(!$total_count || !count($document_list))-->
	<p id="noResults">{$lang->no_documents}</p>
	<!--@else-->
		<!--@foreach($document_list as $no => $document)-->
			<tr class="bg{($no+1)%2+1} separator">
				<td class="thread" style="width:45%">
					<table cellpadding="0" cellspacing="0" border="0" class="t_first">
					<tbody>
					<tr>
			     	<!--@if($grant->manager || $grant->moderator)-->
					<td style="width:15px;"><input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($document->isCarted())-->checked="checked"<!--@end--> /></td>
				<!--@end-->
					<td>
					<h3>
						<a href="{getUrl('document_srl',$document->document_srl, 'listStyle', $listStyle, 'cpage',1)}">
						{$document->getTitle($module_info->subject_cut_size)}
						</a>
					</h3>
					<p>
						<span>{$lang->started_by}:</span>
						<a href="#popup_menu_area" class="member_{$document->get('member_srl')}" onclick="return false">
						{$document->getNickName()}
						</a>
					</p></td>
					</tr>
					</tbody>
					</table>
				</td>
				<!--@foreach($list_config as $key => $val)-->
					<!--@if($val->idx == -1)-->
						<!--@if($val->type == 'regdate')-->
							<td>
								{$document->getRegdate('Y-m-d')}
							</td>
						<!--@elseif($val->type == 'last_update')-->
							<td class="td4" style="width:20%">
								<table cellpadding="0" cellspacing="0" border="0" class="t_last" style="width:100%">
								<tbody>
								<tr>
								<td style="width:60%"><!--@if($document->latest_post)-->
									<p><span style="font-weight: bold;"></span>{zdate($document->get('last_update'),'Y-m-d')}</p>
									<p><span>{$lang->by} </span>{$document->get('last_updater')}</p>
									<a href="{getUrl('mid','','document_srl', $document->document_srl,'cpage','')}#comment_{$document->latest_post}">{$lang->latest_post}</a>
								<!--@else-->
									<p><span style="font-weight: bold;"></span>{$document->getRegdate('Y-m-d')}</p>
									<p><span>{$lang->by} </span>{$document->get('nick_name')}</p>
									<a href="{getUrl('mid','','document_srl', $document->document_srl,'cpage','')}">{$lang->latest_post}</a>
								<!--@end--></td>
								<td class="td_user" style="width:40%">
								<!--@if($grant->manager) -->
								<a href="{getUrl('act','dispForumBanUser','document_srl',$document->document_srl,'member_srl',$document->get('member_srl'),'ipaddress',$document->get('ipaddress'))}"><img class="iePngFix" src="images/common/ban-user.png"></a>
								<!--@end-->	
								</td>
								</tr>
								</tbody>
								</table>
							</td>
						<!--@elseif($val->type == 'comment_count')-->
							<td style="width:15%">
									<span class="replyNum" title="Posts">{$document->getCommentCount() + 1}</span>
							</td>
						<!--@elseif($val->type == 'Replies')-->
							<td>
									<span class="replyNum" title="Posts">{$document->getCommentCount()}</span>
							</td>
						<!--@elseif($val->type == 'readed_count')-->
							<td class="td2" style="width:15%">
								{$document->get('readed_count')}
							</td>
						<!--@end-->

					<!--@else-->
							<td>
								{$document->getExtraValueHTML($val->idx)}&nbsp;
							</td>
					<!--@end-->
				<!--@end-->
			</tr>
		<!--@end-->
	<!--@end-->
		</tbody>
	</table>	
</div>	
	<!--@end-->	
</form>

